//-------------------------------------------------------------------------------------------------
// Title: BasicShader2.fx
// Author: Gael Huber
// Description: Basic shader with a "camera"
//-------------------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------------------
// Constant buffer variables
//-------------------------------------------------------------------------------------------------
cbuffer ConstantBuffer : register(b0)
{
	matrix World;
	matrix ViewProj;
//	matrix Projection;
}

//-------------------------------------------------------------------------------------------------
// Output struct from vertex shader
//-------------------------------------------------------------------------------------------------
struct VS_OUTPUT
{
	float4 Pos : SV_POSITION;
	float4 Color : COLOR0;
};

//-------------------------------------------------------------------------------------------------
// Vertex Shader
//-------------------------------------------------------------------------------------------------
VS_OUTPUT VS(float4 Pos : POSITION, float4 Color : COLOR)
{
	VS_OUTPUT output = (VS_OUTPUT)0;
	output.Pos = mul(Pos, World);
	output.Pos = mul(output.Pos, ViewProj);
	//output.Pos = mul(output.Pos, Projection);
	output.Color = Color;
	return output;
}

//-------------------------------------------------------------------------------------------------
// Pixel Shader
//-------------------------------------------------------------------------------------------------
float4 PS(VS_OUTPUT input) : SV_TARGET
{
	return input.Color;
}